package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Emp;

import com.itheima.pojo.GenderData;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface EmpMapper extends BaseMapper<Emp> {

    //统计员工性别数据
   @Select("SELECT (CASE gender  WHEN 1 THEN '男性员工' WHEN 2 THEN '女性员工' END) AS NAME,COUNT(*) AS VALUE FROM emp GROUP BY gender")
   List<GenderData> getEmpGenderDataStatistics();

}
